package com.bea.ftd.common.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.bea.ftd.common.entity.MsgMapping;

@Repository
public interface MsgMappingRepo extends JpaRepository<MsgMapping,Long> {

    List<MsgMapping> findAllByInterfaceId(String apiId);

    @Modifying
    @Query(value = "delete from msg_mapping where interface_id = '?1';", nativeQuery = true)
    void deleteByInterfaceId(String apiId);

}
